/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package edu.isi.pegasus.planner.subworkflow;
import edu.isi.pegasus.planner.classes.ADag;
import edu.isi.pegasus.planner.classes.PegasusBag;
import edu.isi.pegasus.planner.subworkflow.scheduler.SchedulerFactory;
import edu.isi.pegasus.planner.subworkflow.scheduler.SchedulerImplementation;
import java.util.Map;
/**
 *
 * @author wchen
 */
public class CreateSubDAX {

    //private SubworkflowPartitioner partitioner;
    private SchedulerImplementation scheduler;
    protected ADag mDag;
    protected PegasusBag mBag;

    public Map getDAXRC()
    {
        return scheduler.getDAXRC();
    }
    public CreateSubDAX(ADag dag, PegasusBag bag){

        this.mBag = bag;
        this.mDag = dag;
        String className = this.mBag.getPegasusProperties().getProperty("pegasus.subworkflow.scheduler");
        System.out.println("Selected Scheduler is " + className);
        scheduler = SchedulerFactory.loadInstance(mDag, mBag, className);
    }

    public void addDAXJob()
    {
        scheduler.addDAXJob();
     
    }
   

}
